Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / .github / agents / speckit.git.initialize.agent.md

Displaying Raw • View renderedDownload

.github/agents/speckit.git.initialize.agent.md ca046eddf2b741fb113fc6bf4503f81e06932121 (ca046edd) Text, 1.63 KB

---
Tc9d1d9description: Initialize a Git repository with an initial commit
Tc9d1d9---


<!-- Extension: git -->
<!-- Config: .specify/extensions/git/ -->
Tc9d1d9# Initialize Git Repository

Initialize a Git repository in the current project directory if one does not already exist.

Tc9d1d9## Execution

Run the appropriate script from the project root:

Tff7b72- **Bash**: Ta5d6ff`.specify/extensions/git/scripts/bash/initialize-repo.sh`
Tff7b72- **PowerShell**: Ta5d6ff`.specify/extensions/git/scripts/powershell/initialize-repo.ps1`

If the extension scripts are not found, fall back to:
Tff7b72- **Bash**: Ta5d6ff`git init && git add . && git commit -m "Initial commit from Specify template"`
Tff7b72- **PowerShell**: Ta5d6ff`git init; git add .; git commit -m "Initial commit from Specify template"`

The script handles all checks internally:
Tff7b72- Skips if Git is not available
Tff7b72- Skips if already inside a Git repository
Tff7b72- Runs Ta5d6ff`git init`, Ta5d6ff`git add .`, and Ta5d6ff`git commit` with an initial commit message

Tc9d1d9## Customization

Replace the script to add project-specific Git initialization steps:
Tff7b72- Custom Ta5d6ff`.gitignore` templates
Tff7b72- Default branch naming (Ta5d6ff`git config init.defaultBranch`)
Tff7b72- Git LFS setup
Tff7b72- Git hooks installation
Tff7b72- Commit signing configuration
Tff7b72- Git Flow initialization

Tc9d1d9## Output

On success:
Tff7b72- Ta5d6ff`✓ Git repository initialized`

Tc9d1d9## Graceful Degradation

If Git is not installed:
Tff7b72- Warn the user
Tff7b72- Skip repository initialization
Tff7b72- The project continues to function without Git (specs can still be created under Ta5d6ff`specs/`)

If Git is installed but Ta5d6ff`git init`, Ta5d6ff`git add .`, or Ta5d6ff`git commit` fails:
Tff7b72- Surface the error to the user
Tff7b72- Stop this command rather than continuing with a partially initialized repository

Served by rngit 1.5.2 - Generated in 0.1s